import unittest

class Test1(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        print('all cases before')

    @classmethod
    def tearDownClass(cls):
        print('all cases after')


    def setUp(self):
        print('case before')

    def tearDown(self):
        print('case after')

    # @unittest.skip('不执行')
    def test_case02(self):
        print('case 1')

    def test_case01(self):
        print('case 2')

    def test_case03(self):
        print('case 3')



if __name__ == '__main__':

    # unittest.main()

    suite = unittest.TestSuite()
    suite.addTest(Test1('test_case02'))
    suite.addTest(Test1('test_case01'))
    unittest.TextTestRunner().run(suite)